load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_binary(
    name = "client",
    embed = [":client_lib"],
    importpath = "github.com/PacktPublishing/gRPC-Go-for-Professionals/client",
    visibility = ["//visibility:public"],
)

go_library(
    name = "client_lib",
    srcs = [
        "interceptors.go",
        "main.go",
    ],
    data = [
        "//certs:ca_cert.pem",
    ],
    importpath = "github.com/PacktPublishing/gRPC-Go-for-Professionals/client",
    visibility = ["//visibility:private"],
    deps = [
        "//proto/todo/v2:todo",
        "@org_golang_google_grpc//:go_default_library",
        "@org_golang_google_grpc//codes",
        "@org_golang_google_grpc//credentials",
        "@org_golang_google_grpc//metadata",
        "@org_golang_google_grpc//status",
        "@org_golang_google_protobuf//types/known/fieldmaskpb",
        "@org_golang_google_protobuf//types/known/timestamppb",
    ],
)
